
<%@ include file="/WEB-INF/jsp/include/page_header.jspf" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>       

        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <script type="text/javascript" src="${pageContext.request.contextPath}/js/galleria-1.2.6.min.js"></script>
        <script type="text/javascript">
            $(function() {
                Galleria.loadTheme('${pageContext.request.contextPath}/js/galleria.classic.min.js');
                $('#galleria').galleria();
            });
            
            function viewImg (id) {
                var url = "${pageContext.request.contextPath}/dokumen/view/" + id;
                window.open(url, "THv3","status=0,toolbar=0,location=0,menubar=0,width=900,height=600");        
            }
            
            function doEnquiry (id, frm, event){
                frm.action = frm.action + '?' + event + '&idBuilding=' + id;
                frm.submit();
            }
        </script>
        <style>           

            /* This rule is read by Galleria to define the gallery height: */
            #galleria{ height:320px; }           

        </style>
    </head>
    <body>
        <img src="images/1_1_empty.gif" width="50" height="8">


        <s:useActionBean beanclass="ipfms.stripes.util.ListUtil" var="list"/>
        <form:form beanclass="ipfms.stripes.property.PropertyAction">

            <div class="content">
                <div id="galleria">


                    <c:forEach items="${actionBean.building.buildingImgList}" var="item" varStatus="line">
                        <a href="${pageContext.request.contextPath}/dokumen/view/${item.idImg}">
                            <img src="${pageContext.request.contextPath}/dokumen/view/${item.idImg}" width="100" height="100"/>          
                        </a>
                    </c:forEach>

                </div>
            </div>
            <fieldset class="aras1">
                <legend>PROPERTY DETAIL</legend>

                <p>
                    <label class="label1">Property Name :</label>${actionBean.building.buildingName}&nbsp;
                </p>
                <p>
                    <label class="label1">Address :</label>${actionBean.building.buildingAdd1}&nbsp;
                </p>
                <p>
                    <label class="label1">&nbsp;</label>${actionBean.building.buildingAdd2}&nbsp;
                </p>
                <p>
                    <label class="label1">&nbsp;</label>${actionBean.building.buildingAdd3}&nbsp;
                </p>
                <p>
                    <label class="label1">&nbsp;</label>${actionBean.building.buildingAdd4}&nbsp;
                </p>
                <p>
                    <label class="label1">Postcode :</label>${actionBean.building.buildingPostcode}&nbsp;
                </p>
                <p>
                    <label class="label1">State :</label>${actionBean.building.buildingState.desc}&nbsp;
                </p>

                <p>
                    <label class="label1">Property Type :</label>
                    ${actionBean.building.buildingType.desc}&nbsp;
                </p>
                <p>
                    <label class="label1">Year of Completion :</label>
                    ${actionBean.building.yearCompletion}&nbsp;
                </p>
                <p>
                    <label class="label1">Total number of floor :</label>
                    ${actionBean.building.totalFloor}&nbsp;
                </p>
                <p>
                    <label class="label1">Maximum unit per floor :</label>
                    ${actionBean.building.maxUnitPerFloor}&nbsp;
                </p>

                <p>
                    <label class="label1">Build Up :</label>
                    ${actionBean.building.buildUp} sq. ft

                </p>
                <p>
                    <label class="label1">Property Description :</label>
                    ${actionBean.building.buidingDesc} &nbsp;                   
                </p> 
                <p>
                    <label class="label1">&nbsp;</label>
                    <img src="images/1_1_empty.gif" width="8" height="20"/>
                </p>
                
                <c:if test="${!empty actionBean.building.mapLocation}">
                <p>
                    <label class="label1">&nbsp;</label>
                    <img src="http://maps.googleapis.com/maps/api/staticmap?center=${actionBean.building.mapLocation}&&markers=color:blue|${actionBean.building.mapLocation}&zoom=14&size=400x400&sensor=false">
                </p>
                </c:if>
                
                <p>
                    <label class="label1">&nbsp;</label>
                    <img src="images/1_1_empty.gif" width="8" height="20"/>
                </p>
                <c:if test="${enquiry}">
                <p>
                    <label class="label1">&nbsp;</label>&nbsp;
                    <s:button name="enquiry" value="Enquiry" class="btn" onclick="doEnquiry('${actionBean.building.idBuilding}', this.form, this.name);"/>
                </p>
                </c:if>                
                <c:if test="${claim}">
                <p>
                    <label class="label1">&nbsp;</label>&nbsp;
                    <s:button name="claim" value="Claim" class="btn" onclick="doEnquiry('${actionBean.building.idBuilding}', this.form, this.name);"/>
                </p>
                </c:if>
                <br>
            </fieldset>

        </form:form>



    </body>
</html>